package ro.qwq.webssh.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import ro.qwq.webssh.Utils.SecretUtils;

@Slf4j
@RequestMapping("/Sectrect")
@RestController
public class SecrectControl {
	@PostMapping("/password")
	public String secrectPassword(@RequestParam("password") String password) {
		return SecretUtils.encrypt(password, SecretUtils.AES_KEY);
	}
}
